package com.example.evanproject.mapper;

import com.example.evanproject.domain.Studentcourses;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author hanxiaoqi
* @description 针对表【studentcourses】的数据库操作Mapper
* @createDate 2024-03-09 21:52:13
* @Entity generator.domain.Studentcourses
*/
@Mapper
public interface StudentcoursesMapper extends BaseMapper<Studentcourses> {

    @Select("select * from studentcourses where s_id=#{usrid}")
    List<Studentcourses> selectbuUserid(Integer usrid);

    @Select("select s_id from studentcourses where course_id=#{courseid}")
    List<Studentcourses> selectbycourseidstudent(Integer courseid);
    Studentcourses selectisexit(@Param("cId") Integer cId, @Param("sId") Integer sId);

    @Insert("insert into studentcourses(course_id,s_id) values (#{cId},#{sId})")
    Integer insertdatalist(Integer cId, Integer sId);
}




